package test.algorithm.recursion;

import test.entity.TreeNode;
import test.utils.TreeNodeUtil;

import java.util.HashSet;

/**
 * @Projectname: algorithm-training-camp
 * @Filename: ParentNode
 * @Author: FANSEA
 * @Date:2024/9/13 18:28
 */
public class ParentNode {
    public static void main(String[] args) {
        HashSet<TreeNode> treeNodes = new HashSet<>();
        TreeNode root = TreeNodeUtil.ROOT;
    }
    /*public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
        if (root == null || root == p || root == q) {
            return root;
        }
        TreeNode left = lowestCommonAncestor(root.left, p, q);
        TreeNode right = lowestCommonAncestor(root.right, p, q);
        if (left != null && right != null) {
            return left != null ? left : right;
        }
    }
*/

}
